<?php

/**
 * This is the model metadata class for table "travel_agency".
 */
class TravelAgencyMetadata extends CARMDC
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'travel_agency';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('province, city, district', 'numerical', 'integerOnly'=>true),
			array('name, image', 'length', 'max'=>50),
			array('address', 'length', 'max'=>255),
			array('desc', 'safe'),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('id, name, image, province, city, district, address, desc', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id' => 'ID',
			'name' => '景区名',
			'image' => '图片',
			'province' => '省',
			'city' => '市',
			'district' => '区',
			'address' => '详细地址',
			'desc' => '景区介绍',
		);
	}
}